perm filename TODO[RDG,DBL]1 blob sn#529707 filedate 1980-08-22 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00007 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	Dave's changes
C00003 00003		Things yet to be done to RLL:
C00011 00004	Quickies:
C00014 00005		to Dave
C00019 00006	Units to Rename/Add/Delete
C00026 00007		Things done
C00036 ENDMK
C⊗;
Dave's changes
 Fast flag to UU-DIAGNOSE
 QUOTE?# => QUOTE?
 UF-CANCELNETWORK takes a list
 UF-OPENNETWORK & UF-CLOSENETWORK  -- 2nd arg is fn to be executed
	[NIL defaults to earlier; T does nothing]
	-- 3rd arg : T means ReadOnly
   -- rewrite own UP-OPENNETWORK -

Twiddle AFTERSYSOUTFORMS, BEFORESYSOUTFORMS
	Things yet to be done to RLL:
updated [8 May 1980], [6 Apr 1980], started [8 Feb 1980]

0. BIG CHANGE: The UNIT should know about the accessing, not the slot! Hence,
	associate with each KB (or unit?) the name of the accessing types -
	so change GetValue to RLLGetValue, and stick (Get . RLLGetValue) on each
	of current KBs (similiarly with Put, Add, ...)
	Note: to emulate Units, just put UA-GETVALUE there...

    In this way, we can solve Geneseeth's & R H-R's complaints, ...
	and allow various schemes
	for indexing.

1. Extend notion of Caching -- ie of a stored value.
  Slots are but one way.
  General spec for function:
	(Pre work)
	Look it up
	  If not found: Compute it
	(Post work)
  Examples: FunctionSpec
	(note it should be calculated by combining Defn, ... if ~∃ HighLevelDefn)
	    Slots for IExamples((AnyDog))
	    ? Descriptors?

2. Fix slots of AllExamples[AnyFormat] do the right thing. They are (I think)
  correct for FSet, FSingleton, FBag and FList; and and other SlotFormat
   FnForDeleting, FnForSubstituting, FnForAdding, FnForVerifyingAll, FnForKilling
  but not at all for those in AnyValueFormat.
	Also, many of these are inconsistent
  eg: FExecute - capable of using uUNIT and uSLOT, bound by FindDefault.
    	Will this get in trouble - ie with recursion?
	ANS: New why, with (ValueFor unit slot)

3. Is this how to handle Templates?
	- so can determine new task by fleshing out such descriptor.
	only here will it call that function [in FindDefault]

4. The way of handling functions [Processes] is NOT totally consistent. 
   Should have arglists,... Also some notion of how to check for what.
   Case when is sub-unit, versus user callable fn...
	New apply - should be: if ∃ n args, if n=1, then slot, n=2 => field,
		else just apply defn of first arg...
   Change from Defn & HowToProcess to LispFn

5. Fix Processes, so its args can vary
	ie, use DomainType for each, with RangeType = "WhoCares"

  5b. Unit creation is a  unit list process - make it so. Give it a defn, whose
	rangetype is WhoCares!
 Note: This KBupdates is also a UnitProcess -- make it so! 
	NOTE: for EuriskoProcesses, DomainType deduced from WhatToProcess

5. Production Rules - their formalism, and the like, needs to be resolved.
	Figure out more stuff for rules - eg store # of times tried, and success.
	More heuristics... (eg  AnyUnitCreationRule)

7. Write CommonHLDefn -- HighLevelDefn should be sufficient to define a slot!
  Note: Slot Combiners take 3-arguments
	First is list of slots,
	Second is list of argnames 
	Second is specifications -- eg TransitiveClosureCircular, Ordered, ...

8. FirstDefined -- new type of slot combiner - like McCarthy OR - when subslots
    	are disjoint.

9. Make sure each slot has a MakesSenseFor 
	- and improve final function to	confirm that for each...

10. Use result of DefaultBeforePutValue - and make sure the verifiers return
    	such [this is modify...]

11. Figure what goes on FunctionCharacter
    
12. ToCache of AllTypicalExamples  - (*Do* SeeU&S +++ AllExamples)

13. Make unit initialization faster 
	- cache slots, ... on inheritance.

14. IgnoreCached - if given to GetValue, does not do UA-GETVALUE, just uses Defn
	to recompute it. Note: old value should be passed to CacheValue - this
	had always been NIL before.

16. Need a WhenFilled (Defn like IfNeeded) - this pushes some values along
	when a new value has been enterred...
	[This can do (1) recomputing Essential slots, and (2) determining value
	of slot X when slot Y has been changed.]
  Use this to rid self of FunctionSpec monstronsity, by always pushing values into
	slots, in all three cases. [Use CacheValue for one not explicitly requested,
	with why value explaining this.]
  Another solution: 
	FunctionSpec, when called, automatically caches Defn, DomainType and
	RangeType. So these slots don't both caching -- ie ∃ new slot,
	ToCacheValueFromElsewhere, which FunctionSpec calls.
	Note  Defn:ToCacheValue is AlreadyCached (which ≡ NoOp)
     (Should the slot-combiner know about this? How? 
	? (DoAlready (ApplyingFn CAR HighLevelDefn)) ?

17. More work with HighLevelDefn - so if F ≡ (SC f1 f2), then we can determine
	the HighLevelDefn of f1, if necessary

18. Caching - by storing AllIsas on AnyX, and putting (FSeeU&S AnyX SuperClass*),
on all units y s.t. y.Isa = (AnyX) [note must be a singleton.]

---------
MyIsa, AnyIsa, ExistIsa, VariesWith, ...
Quickies:

0) Now (4 July) doing:
	AnyUser - see #5

0.5) ReadOnly Mode -- set UP.BUMP? to NIL 
	LOGOUT's advise - to see if any put units since last SYSOUT, or
	OpenNetwork (if UF.NETWORKS non-NIL)
  [When logging out, ask user -- even if ReadOnly...?]
 Store who has used this core image.

1) Finish IsParse? - used with GrammarType.

2) UnionType, and IntersectType - need to deal with cases when types are
	different (eg FunctionType & SlotType [transform SlotType into
	(FunctionType (?DomainType? UnitType...))

3) Use QUOTE? and QUOTE?1 to advantage, to make more readible code

4) Finish up various facts about SlotCombiners.

5) AnyUser, in RLL. - here we store which KBs this user will want. In START,
	single question: "Your usual?". If Y, these loaded in.
	Else gets list, with questions. (May decide these are to be his default, or
	not.) Also, his "profile" indicates answers to the questions.
	Store with each KB whether or not it was Disconnected (and from whom.)
	If not, why even ask to reconnect?
  When he creates a new KB, this added to his list.

6) Description of KBs, at top level [logically distinct]
RLL - only the list of "stops", with essential ones extended.
USERS - list of users, and of classes of users - this KB always loaded in as well.
HEADERS - misc very high level things, which point to most of rest (basically this
	is set of units for classes.)
SLOTS - holds all the slots

Dave: could we have several logically distinct KBs on one file?
	to Dave
Finally thought of them:
	Arg to pass to OverallStartUp, and WhenClosing - so not just name,
	put 2nd value, which that function can use.
	(This ?th argument to UF-OPENNETWORK/UF-WRITENETWORK)

Mailed to CSD.SMITH 12:20PM 17-June
Dave: Are these alterations/creations feasible?
1) Arg to UP-BUMPUNITS - whether or not to GC Trp 
	ie if non-NIL, then do NOT GCTrp [ = T in UU-DIAGNOSE ]

Thanks, Russ
Units to Rename/Add/Delete

PrimSlot	 →	AnyPrimSlot	← RemoveVirtualSlots
VirtualSlot	 →	AnyVirtualSlot  ← RemoveVirtualSlots
$SELF$Slot	 →	Any$SELF$Slot
ToInitialize	 →	ToInitializeValue ← InitializeSlot
ToCache		 →	ToCacheValue	← CacheValue
ActionPartOfRule →	AnyActionPartOfRule
IfPartOfRule	 →	AnyIfPartOfRule
ThenPartOfRule	 →	AnyThenPartOfRule
Exs		 →	Examples
Examples	 →	NamedExamples
Defn		 →	LispFn
HowToProcess	 →	LispFn
	fix FGet1Value, HLParser, Process
[Args to Process -dependent on ?]

	Things done
[4 July 1980]
1. Fix EDITU so second arg given to PutValue -- so may verify or not...

2. (QUOTE?# '(LAMBDA (*1) (PROG ?1 *2))
	    '((G0035)) 
	    '((unit slot) 
		((* this list is bound to *2) (UA-MAPSLOTS unit 'WRITELNTTY))))
  returns
   (LAMBDA (unit slot) 
	(PROG (G0035) 
	      (* this list is bound to *2)
	      (UA-MAPSLOTS unit 'WRITELNTTY)))
	That is, QUOTE?1 takes three arguments:
	#1: a list, in which substitutions will be made,
	#2: a list, whose i-th element is the value for ?i [here ?1 is (G0035)]
	#3: a list, whose i-th element is the value for *i [here *1 is (unit slot)]

[8 May 1980]
1. Ramifications of Altering a slot's value -- eg
	(i) IF x.S* is changed, THEN ∀ y ε x.(S-1)*, y.S* is invalid
	    [IF S = T ∪ V, & something is added to x.T
		THEN x.S should have that value aded as well - if format is ...]
	(ii) IF OrderedX is built from X by some ordering - ie is redundant-but
		ordered of X - then when U.X is modified by Adding, or Renaming,
		X should be removed from U.SlotsNowOrdered.

5. DomainType, RangeType
	ValuesInvalidated - defined from HighLevel, as should Format, Datatypes

    1) Make sure VerifyAll is doing the correct thing. Also pass unit and slot name
    	to it. (Fix it up for rest of ValueFormats.)
    	Delete now worthless FnForVerifyingAll and -- List.
*   2) MyKB is AnyUnitFunction - make it so.
    5) Args to HLDefnParser should be (name (RangeType) ...) 
    	(note: delete HLVerify - now RangeType.)
    Define DomainTpe, RangeType
    	[Note: need only FnForAdding - 1, List, 1st - come from why part.

 Units renamed.
FnForRenaming1	 →	FnForSubstituting1
ToRenameValue	 →	ToSubstValue	← ↓
[DefaultRenameValue → DefaultSubstValue - this a function]
SubSetDT	 →	SubDT
SuperSetDT	 →	SuperDT
SlotsNowOrdered	 →	MySlotsNowOrdered
EssentialVirtualSlots	 →	MyEssentialVirtualSlots
DependantNetworks →	DependentNetworks  ← GetKBs
ISpecs		 →	ISubClass
PossibleSlotsOfISpecs →	PossibleSlotsOfISubClass
ActionType	 →	FunctionType

 Fix HLDefn.Defn (or ToInit..) - SortSlots => PutInOrder
 CreateSlot - descends from VirtualSlot, not AnySlot
 Fn for computing ToParseParts-like thing, so TPP can be eliminated
 Format & Datatype - should descend from RangeType, softly (not FunctionSpec)
 Names selected - need loops 
	λ(x) (McDo .. (NOT (Unitp (RPLACA (SETQ ...(EXPLODE (GETSYM))  
	[in CreateU4S,CreateSlot. ...]
 Ask user if he wishes to create a new slot - 
	[do we want to merge all things invalidated into one? 
	[  No! Later we might want to do other things, than just invalidate]
	If not, just pass HLDefnParser( highleveldefn ) along - use GetGetVal,
	and the like...
	 - so either PSUEDO-slot or REAL-slot
 If the "why" to the Invalidate function included "DoInverses", pass this along to
	AfterPutValue, so it will actually remove this and that!